package com.bykj.property.sys.dao;


import com.bykj.property.model.SysUser;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;


/**
* @author yiming
* @title: SysUserDao
* @projectName property
* @description: TODO
* @date 2019/6/1119:56
*/
public interface SysUserDao extends BaseMapper<SysUser>{
@Select("select * from sys_user where username=#{username}")
@Results({
@Result(property = "sysRoles",column = "sys_user_id",many = @Many(select = "com.bykj.property.sys.dao.SysRoleDao.getByUserId"))
})
SysUser getByUsername(String username);
}
